The background description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the inventors hereof, to the extent the work is described in this background section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the present disclosure.
Storage devices, such as those using flash technology, may use different granularities for writing and erasing data stored on the storage device. For example, data may be written in units of a “page,” whereas data may only be erased in units of a “block.” A block may include a plurality of pages. Erase operations may need to be performed in order to free up storage space that contains data that has become invalid, for example, because it belongs to a file deleted by a user. Even though the user may have deleted the file, some or all of the data associated with the file may remain stored on the storage device until it is overwritten or explicitly erased by the storage device. For instance, this may be the case when the deletion of a file by the user merely deletes a pointer to the file in a file system.
In order to free up storage space, storage devices may perform memory management, a process that may include so-called “garbage collection” and “wear-leveling.” Garbage collection may refer to a process of consolidating information stored in blocks that contain both valid and invalid data pages. By moving the valid data pages of a block to other locations in the memory, the block may be erased without loss of data. This consolidation of data may generally reduce fragmentation in the sense that blocks containing only a small number of valid data pages are avoided. In some implementations, the process of garbage collection may have significant performance impact in terms of sustained performance and durability.
Wear-leveling may refer to the process of equalizing the number of times data pages are programmed and erased. In some aspects, certain memory technologies may allow data pages to only be programmed and erased for a predefined number of times, or program/erase (P/E) cycles. In order to improve the life span, durability, or robustness of a storage device, it may therefore be beneficial to evenly distribute the number of access operations, or P/E cycles, across data pages, such as to avoid scenarios in which certain data pages of the storage device becomes unusable before others.